package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.IntegralGoods;
import com.weipai.springboot.model.SpecialGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SpecialGoodsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SpecialGoods record);

    int insertSelective(SpecialGoods record);

    SpecialGoods selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SpecialGoods record);

    int updateByPrimaryKey(SpecialGoods record);

    List<Map<String, Object>> listSpecialGoods(@Param("specialOfferId") String specialOfferId, @Param("start") Integer start, @Param("size") Integer size);

    int specialGoodsCount(@Param("specialOfferId") String specialOfferId);

    //通过会场id和商品id确定该商品是否添加入了会场
    IntegralGoods selectByGoodsId(@Param("goodsId") String goodsId, @Param("specialOfferId") String specialOfferId);

    //秒杀商品和会场商品--前端商品详情
    Map<String,Object> getSpecialGoodsInfo(String id);

    SpecialGoods selectByGoodsIdAndspecialId(@Param("goodsId") String goodsId, @Param("id") String specialOfferId);
}